Add AST Metrics - #1860
Open
Halleck45 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! Thanks for maintaining this list, it has been a genuinely useful reference for me over the years.
This adds AST Metrics, a multi-language code maintainability analyzer.
It is not a linter in the correctness sense: instead of reporting rule violations, it computes maintainability metrics that most linters do not cover (cyclomatic and cognitive complexity, Halstead volume, afferent/efferent coupling, maintainability index) and detects communities in the dependency graph. Output formats: explorable HTML report, plus JSON, Markdown, SARIF and OpenMetrics for CI.
It ships as a single Go binary with no runtime dependency, so analyzing PHP or Python does not require a PHP or Python installation (parsing is done with tree-sitter). It also embeds an MCP server, so AI coding agents can query codebase structure and risk areas.
Languages supported today: Go, PHP, Python, Rust, Java, C#, TypeScript.
Disclosure: I am the author. I also wrote PhpMetrics, already listed here; AST Metrics is its multi-language successor, and PhpMetrics remains maintained.
Contributing criteria:
Only
data/tools/ast-metrics.ymlis added.README.mdanddata/api/are untouched. I ranmake render-skip-deprecatedlocally to validate: it renders without error and the entry lands in the "Multiple languages" section.Happy to adjust the wording, the tags or the category if you would rather have it described differently. Thanks for taking a look!